#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cstl/clist.h>
#include <cstl/cvector.h>
#include "libxl.h"

#define MAX_LENGTH 30
#define AP_COUNT 100
#define AL_COUNT 100

int Number_sites;

//char ap_names[AP_COUNT][MAX_LENGTH];
int paths[AP_COUNT][AP_COUNT][AP_COUNT];

int matrix[AP_COUNT][AP_COUNT];
int matrix2[AP_COUNT][AP_COUNT];
int m_tmp[AP_COUNT][AP_COUNT];

struct vdata { char id[30], label[30]; };
struct edata { float w; char id1[30], id2[30]; int time;};

struct edge{
    float w;
    char eid[30];
    char elabel[30];
    int time;
};

struct vertex{
    char vid[30];
    char vlabel[30];
	vector_t *edges;
};

int get_apid(const char *ap, vector_t *g);
const char* get_apname(int num, vector_t *g);
void printMatrix(vector_t *g);
int ordinary_search(vector_t *g, const char * ss, const char *es);
int matrix_power();